1. Field of Disclosure
The present disclosure relates generally to storage technology, and more specifically to optimal use of buffer space by a storage controller which writes retrieved data directly to a memory.
2. Related Art
A storage controller refers to a component (or unit), which controls read and write requests to a non-volatile storage medium. The requests are often received from central processors (e.g., a central processing unit, CPU) and the storage controller interfaces with the non-volatile storage medium to process each request. In case of read requests, the storage controller retrieves data from the non-volatile storage medium.
Storage controllers are often required to write retrieved data into a memory. For example, a CPU may indicate that the data contained in a file be retrieved and stored in random access memory (RAM) operating as a main memory (to distinguish from the controller memory, noted below).
The storage controller may further be requested to write directly into the memory. ‘Directly’ generally implies that the storage controller store the data in the RAM, without interrupting the CPU for each storage operation. As an illustration, in a direct memory access (DMA) operation, a storage controller interrupts a CPU only after completion of storing the entire data.
Buffer space is typically provided in (or associated with) storage controllers to support various read/write requests. Buffer space provides for temporary storage and allows orderly transfer of data even in case of speed mismatches and unavailability of resources (e.g., a bus) to store the data in the target main memory. The buffer space is typically implemented as a RAM, and referred to as a controller memory.
It is generally desirable that the buffer space be used optimally such that various operations can be supported efficiently (one or more of better throughput, reduced latency, etc.), even with smaller buffer/memory sizes.
In the drawings, like reference numbers generally indicate identical, functionally similar, and/or structurally similar elements. The drawing in which an element first appears is indicated by the leftmost digit(s) in the corresponding reference number.